//
// Created by 紫霄 on 2020/4/10.
//

#ifndef LEETCODE_10FROG_H
#define LEETCODE_10FROG_H
class Solution {
public:
  int numWays(int n) {
    int i = 1;
    int j = 1;
    while (n--) {
      j = i + j;
      i = j - i;
      if (i >= 1000000007)
        i -= 1000000007;
      if (j >= 1000000007)
        j -= 1000000007;
    }
    return i;
  }
};
#endif // LEETCODE_10FROG_H
